<template>
  <el-card>
    <el-form label-width="120px">
      <el-form-item label="SPU名称" prop="spuName">
        <span> SPU名称 </span>
      </el-form-item>
      <el-form-item label="SKU名称" prop="skuName">
        <el-input placeholder="SKU名称"></el-input>
      </el-form-item>
      <el-form-item label="价格（元）" prop="price">
        <el-input placeholder="1"></el-input>
      </el-form-item>
      <el-form-item label="重量（千克）" prop="weight">
        <el-input placeholder="1"></el-input>
      </el-form-item>
      <el-form-item label="规格描述" prop="skuDesc">
        <el-input type="textarea" placeholder="请输入sku描述"></el-input>
      </el-form-item>
      <el-form-item label="平台属性" prop="skuAttrValueList"> </el-form-item>
      <el-form-item label="销售属性" prop="skuSaleAttrValueList">
      </el-form-item>
      <el-form-item label="图片列表" prop="skuAttrValueList">
        <el-table>
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column label="图片">
            <template slot-scope="{ row }"></template>
          </el-table-column>
          <el-table-column prop="name" label="名称" width="120">
          </el-table-column>
          <el-table-column prop="name" label="操作">
            <template slot-scope="{ row }">
              <el-button type="primary">设置默认图片</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-form-item>
    </el-form>
    <el-button type="primary" style="margin-left: 120px">保存</el-button>
    <el-button @click="submitSkuForm">取消</el-button>
  </el-card>
</template>

<script>
export default {
  name: "SkuForm",
  props: ["currentSpuInfo"],
  data() {
    return {
      spuId: this.currentSpuInfo.id,
    };
  },
  methods: {
    //点击取消按钮，返回spuList页面
    submitSkuForm() {
      this.$emit("setShowStatus", "SPU_LIST");
    },
  },
};
</script>

<style></style>
